

<?php include_once 'inc_modules_path.php'; ?>
<?php if ($ctype = list_coltypes($this->cid,0,'ctype')) { ?>
    <form class="form-inline" action="<?php echo site_urlc($this->class.'/search/'.$this->cid); ?>" method="GET">
        <?php
        if (isset($_GET['ctype']) AND is_numeric($_GET['ctype']) AND $_GET['ctype']) {
            echo ui_btn_select('ctype',set_value("ctype",$_GET['ctype']),$ctype);
        }else{
            echo ui_btn_select('ctype',set_value("ctype"),$ctype);
        }
        ?>
        <input class="btn" type="submit" value="检索">
    </form>
    <p></p>
<?php } ?>
<div class="boxed">
    <div class="boxed-inner seamless">

<table class="table table-striped table-hover select-list">
    <thead>
        <tr>
            <th class="width-small"><input id='selectbox-all' type="checkbox" > </th>
            <th>机型</th>
            <th>版本号</th>
            <th>下载地址</th>
            <th>添加时间</th>
            <th class="span1">操作</th>
        </tr>
    </thead>
    <tbody class="sort-list">
        <?php foreach ($list as $v):?>
        <tr data-id="<?php echo $v['id'] ?>" data-sort="<?php echo $v['sort_id'] ?>">
            <td><input class="select-it" type="checkbox" value="<?php echo $v['id']; ?>" ></td>
            <td>
                <?php echo $v['ctype'] == 43 ? 'IOS' : 'Android' ?>
             </td>
            <td>
                <?php echo $v['version']?>
            </td>
            <td> <?php echo $v['url'] ?></td>
            <td> <?php echo  date("Y/m/d H:i:s",$v['timeline']); ?> </td>
            <td>
                <div class="btn-group">
                    <a class='btn btn-small' href=" <?php echo site_urlc( $this->router->class.'/edit/'.$v['id']) ?> " title="<?php echo lang('edit') ?>"> <i class="fa fa-pencil"></i> <?php // echo lang('edit') ?></a>
                    <a class='btn btn-danger btn-small btn-del' data-id="<?php echo $v['id'] ?>" href="#"  title="<?php echo lang('del') ?>"> <i class="fa fa-times"></i> <?php // echo lang('del') ?></a>
                </div>
            </td>
        </tr>
        <?php endforeach;?>
    </tbody>
</table>

    </div>
</div>

<?php echo $pages; ?>

<script>
require(['adminer/js/ui'],function(ui){
  var app = {
    url_del: "<?php echo site_urlc('app/delete'); ?>"
    ,url_audit: "<?php echo site_urlc('app/audit'); ?>"
    ,url_flag: "<?php echo site_urlc('app/flag'); ?>"
    ,url_sortid: "<?php echo site_urlc('app/sortid'); ?>"
  };

  ui.fancybox_img();
  ui.btn_delete(app.url_del);     // 删除
  ui.btn_audit(app.url_audit);    // 审核
  ui.btn_flag(app.url_flag);      // 推荐
  ui.sortable(app.url_sortid);    // 排序
});
</script>
